float4x4 matViewProjection;

struct VS_INPUT 
{
   float4 Position: POSITION0;
   float2 TexCoord: TEXCOORD0;
   
};

struct VS_OUTPUT 
{
   float4 Position: POSITION0;
   float2 TexCoord: TEXCOORD0;
   
};

VS_OUTPUT vs_main( VS_INPUT Input )
{
   VS_OUTPUT Output;

   Output.Position = mul( Input.Position, matViewProjection );
   Output.TexCoord = Input.TexCoord;

   return( Output );
   
}

bool bShowClamped;
int scale;


struct PS_INPUT 
{
   float2 TexCoord: TEXCOORD0;
   
};

float4 ps_main( PS_INPUT Input ) : COLOR0
{
   
   int xscale = Input.TexCoord.x * 100 / scale;
   int yscale = Input.TexCoord.y * 100 / scale; 
   
   if ((xscale % 2 != 0 && yscale % 2 == 0) || (xscale % 2 == 0 && yscale % 2 != 0))
   {
      return 1;
   }
   else
   {
      return 0;
   }   
}

technique Schachbrett_Shader
{
   pass Pass1
   {
	  VertexShader = compile vs_2_0 vs_main();
      PixelShader = compile ps_2_0 ps_main();
   }
} 
